<?php

require dirname( __FILE__ ) . "/system/global.php";

if ( $cookie = $_COOKIE[ WEBCOOKIE ] ) {
    $cookie = md6( $cookie, 'decode' );
    $cookie = explode( '|', $cookie );

    list( $uname, $uid, $expire,$sid ) = $cookie;

    switch($sid)
    {
        case 1:
            require WEBLIB . "storeMan.php";                 //系统维护人员
            start( $c, $a, WEBROOT . "system/storeMan/" );
            break;
        case 2:
            require WEBLIB . "supplier.php";                 //供货商
            start( $c, $a, WEBROOT . "system/supplier/" );
            break;
        case 3:                                                //代售商
            require WEBLIB . "saleFac.php";
            start( $c, $a, WEBROOT . "system/saleFac/" );

            break;
       case 4:                                                 //销售商
            require WEBLIB . "goodsSaler.php";
            start( $c, $a, WEBROOT . "system/goodsSaler/" );
            break;
       case 5:                                                //销售商
            require WEBLIB . "goodsSaler.php";
            start( $c, $a, WEBROOT . "system/goodsSaler/" );
            break;
        case 6:                                               //PS美工
            require WEBLIB . "picMakeupEr.php";
            start( $c, $a, WEBROOT . "system/picMakeup/" );
            break;
        case 7:
            require WEBLIB . "goodsPoster.php";
            start( $c, $a, WEBROOT . "system/goodsPoster/" );
            break;
        default:
            require WEBLIB . "admin.php";
            start( $c, $a, WEBROOT . "system/admin/" );
        break;
    }

}
else
{
    require WEBLIB . "admin.php";
    start( $c, $a, WEBROOT . "system/admin/" );
}






?>